<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
    <title>CNM - 中国 Nim 包镜像</title>
    <meta name="keywords" content="Nim,Nimble,choosenim,镜像,加速,国内">
    <meta name="description" content="CNM是用于Nim的简易镜像，支持choosenim和nimble，更适合中国宝宝体质。">
    <meta name="author" content="lzw-723">
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/grids-responsive-min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/base16/material.min.css" rel="stylesheet">
    <style>
        .menu-box {
            position: sticky;
            top: 0;
            padding: 1rem;
            /* https://juejin.cn/post/7215589539679584316 */
            /* 磨砂感背景 */
            backdrop-filter: saturate(180%) blur(5px) !important;
            -webkit-backdrop-filter: saturate(180%) blur(5px) !important;
            /* 磨砂的背景颜色 */
            background: rgba(255, 255, 255, 0.4) !important;
        }

        @media screen and (max-width: 35.5em) {
            .menu-box {
                display: none;
            }
        }

        .menu-box a {
            transition: all 0.1s ease-in-out;
        }

        .menu-box a:hover {
            scale: 1.1;
        }

        .back-top {
            z-index: 9999;
            border-radius: 3rem !important;
            width: 3rem;
            height: 3rem;
            position: fixed;

            right: 3rem;
            bottom: 3rem;
        }

        .main-box {
            /* height: 100%; */
            min-height: 30%;
            padding-top: 20%;
            text-align: center;

            will-change: filter;
            transition: filter 300ms;
        }

        .main-box:hover {
            filter: drop-shadow(0 0 4rem #646cffaa);
        }

        .main-box>a:hover {
            filter: drop-shadow(0 0 3em rgb(223, 117, 20));
        }

        .content {
            padding-left: 1rem;
            padding-right: 1rem;
        }

        hr {
            opacity: 40%;
        }

        .tip {
            font-size: 0.75rem;
        }

        code {
            border-radius: 3px;
        }

        .button-success,
        .button-error,
        .button-warning,
        .button-secondary {
            color: white;
            border-radius: 4px;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
        }

        .button-success {
            background: rgb(28, 184, 65);
        }

        .button-error {
            background: rgb(202, 60, 60);
        }

        .button-warning {
            background: rgb(223, 117, 20);
        }

        .button-secondary {
            background: rgb(66, 184, 221);
        }

        :root {
            font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
            line-height: 1.5;
            font-weight: 400;

            color-scheme: light dark;
            color: rgba(255, 255, 255, 0.87);
            background-color: #242424;

            font-synthesis: none;
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        @media (prefers-color-scheme: light) {
            :root {
                color: #213547;
                background-color: #ffffff;
            }
        }
    </style>
</head>

<body>
    <div class="main" x-data="{top: 0}" @scroll.window.throttle="top = document.documentElement.scrollTop">
        <button class="button-secondary pure-button back-top" x-show="top > 500"
            x-on:click="document.documentElement.scrollTop = 0" x-transition>↑</button>
        <div class="pure-menu pure-menu-horizontal menu-box">
            <a href="#" class="pure-menu-heading pure-menu-link">主页</a>
            <ul class="pure-menu-list">
                <li class="pure-menu-item"><a href="#常见问题" class="pure-menu-link">常见问题</a></li>
                <li class="pure-menu-item"><a href="#服务状态" class="pure-menu-link">服务状态</a></li>
            </ul>
        </div>

        <div class="pure-g">
            <div class="pure-u-md-1-5"></div>
            <div class="pure-u-1 pure-u-md-3-5">
                <div class="main-box">
                    <div style="height: 50%;"></div>
                    <br>
                    <h2>🔥CNM🔥</h2>
                    <h1>China Nim packages Mirror</h1>
                    <br>
                    <br>
                    <a class="pure-button pure-button-primary" href="#配置说明">开始使用</a>
                    <a class="pure-button" target="_blank" href="https://codeberg.org/lzw-723/CNM">了解更多</a>
                    <div style="height: 10%;"></div>
                </div>

                <div class="content">
                    <h3>服务介绍</h3>
                    <p>用于Nim的简易镜像，更适合中国宝宝体质</p>
                    <h3 id="配置说明">配置说明</h3>
                    <hr>
                    <h4>choosenim镜像</h4>
                    <p><code>choosenim</code> 是 <code>Nim</code> 编程语言的安装程序</p>
                    <p>要使用 <code>choosenim</code> 安装 <code>Nim</code> 的最新稳定版本</p>
                    <p>只需在您的终端中运行以下命令</p>
                    <pre><code class="language-shell hljs">curl <span class="hljs-link">https://codeberg.org/lzw-723/CNM/raw/branch/main/init.sh</span> -sSf | sh</code></pre>
                    <p>然后按照提示进行操作</p>
                    <hr>
                    <h4>Nimble包镜像</h4>
                    <p>Nimble配置文件路径</p>
                    <p class="tip">Linux: ~/.config/nimble/nimble.ini</p>
                    <p class="tip">Windows: C:\Users\&lt;YourUser&gt;\AppData\Roaming\nimble\nimble.ini</p>
                    <h5 id="-">第一步</h5>
                    <p>替换官方镜像，在其配置文件中添加</p>
                    <pre>
                    <code class="language-ini hljs"><span class="hljs-section">[PackageList]</span>
<span class="hljs-attr">name</span> = <span class="hljs-string">"official"</span>
<span class="hljs-attr">url</span> = <span class="hljs-string">"https://codeberg.org/lzw-723/CNM/raw/branch/main/packages.best.json"</span></code>
                </pre>
                    <h5 id="-">第二步</h5>
                    <p>刷新缓存</p>
                    <pre>
                    <code class="language-shell hljs"><span class="hljs-built_in">nimble</span> refresh</code>
                </pre>
                    <h3>补充说明</h3>
                    <h4 id="常见问题">常见问题</h4>
                    <ul>
                        <li>
                            <div>
                                服务更新频率是多少?
                                <p>一星期一次？或@我立即更新</p>
                            </div>
                        </li>
                        <li>
                            <div>
                                目前支持几种功能?
                                <p>当前支持Nimble包和choosenim</p>
                            </div>
                        </li>
                    </ul>
                    <h4 id="服务状态">服务状态</h4>
                    todo
                    <div hidden>
                        <div class="pure-button-group" role="group">
                            <button class="pure-button button-success">文档更新时间</button>
                            <button class="pure-button pure-button-disabled">2023年12月25日15点51分</button>
                        </div>
                        <div class="pure-button-group" role="group">
                            <button class="pure-button button-secondary">镜像更新时间</button>
                            <button class="pure-button pure-button-disabled">2023年12月25日15点51分</button>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    </div>

    <noscript>
        <img src="https://shynet.litchi.quest/ingress/dfa1e575-f2ae-4e3e-9f29-e09023b4b84b/pixel.gif">
    </noscript>
    <script defer src="https://shynet.litchi.quest/ingress/dfa1e575-f2ae-4e3e-9f29-e09023b4b84b/script.js"></script>
</body>

</html>